Codeshare List of user-contributed code snippets for dotCMS Java CMS.

Author: "Chris Falzone"

Multi-lingual Navigation

Author: Christopher Falzone |

Here is an example of how to do multi-lingual navigation using the navtool. You need to have your language keys set up and then make each page title a ...

Date Looping

Author: Christopher Falzone |

This is how you can loop over a range of dates in velocity

Twitter4J Viewtool Example

Author: Christopher Falzone |

Just a quick Example of a Twitter4J viewtool.

Mobile Detection and Redirection

Author: Christopher Falzone |

Simple mobile detection and redirection in dotCMS

1.9 Orphaned htmlpage SQL

Author: Chris Falzone |

From time-to-time we still have clients come to us with orphaned files. Here are the queries I use to find/fix them.

Disable Structure Fields in Back-end UI

Author: Jonathan Laughlin |

This javascript, when placed into a custom field, will disable fields listed in the array fieldsToDisable. making them uneditable by back-end UI users.

Import Content (ContentletAPI Example)

Author: Chris Falzone |

From Chris Falzone - an example of importing content in dotCMS 1.7 using the ContentletAPI

Generate A Random Number with Limits

Author: Chris Falzone |

This simple snippet generates a random number between 1 and 5

Change the Page Title and Crumbtrail Title based on URLMapContent

Author: Brent Verkerk & Chris Falzone |

See how to check for URLMapContent in your Template, and change the page title and crumb-trail title accordingly.

Dynamic Content Anchors

Author: Chris Falzone |

This snippet creates Anchor Tags and a navigation links for each contentlet in a container. The idea being that as content is added to the container, ...